"""
@Time ： 2021/10/19 17:55
@Auth ： ChenZhangKun
"""


class Animal:
    def __init__(self, name):
        self.name = name

    def eat(self):
        print("%s会吃饭" % self.name)


class Dog(Animal):

    def shout(self):
        print("%s会犬吠" % self.name)


class XiaoTian(Dog):
    def fly(self):
        print("%s会飞" % self.name)


dog = Dog("旺财")
dog.eat()
dog.shout()

xiao = XiaoTian("哮天犬")
xiao.fly()
xiao.eat()
xiao.shout()
